package org.iweb.html.impl.session;



public class MainManager {

	//private static ThreadLocal<ServiceManager> serviceManager=new ThreadLocal<ServiceManager>();
	
	private static ThreadLocal<AppSession> appSession=new ThreadLocal<AppSession>(); 

//	public static ServiceManager getServiceManager() {
//		return serviceManager.get();
//	}
//
//	public static void setServiceManager(ServiceManager _serviceManager) {
//		if(_serviceManager==null)
//			serviceManager.remove();
//		else
//			serviceManager.set(_serviceManager); 
//	}

	public static AppSession getAppSession() {
		return appSession.get();
	}

	public static void setAppSession(AppSession _appSession) {
		if(_appSession==null)
			MainManager.appSession.remove();
		else
			MainManager.appSession.set(_appSession);
	}

	public static void clean() {
//		setServiceManager(null);
		setAppSession(null);
	}
	
}
